package com.Khan.SocialRescueSys.service.impl;

import com.Khan.SocialRescueSys.dao.ForceDao;
import com.Khan.SocialRescueSys.pojo.Force;
import com.Khan.SocialRescueSys.pojo.ProvinceForceCount;
import com.Khan.SocialRescueSys.service.ForceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Khan Liu
 * @date 2022/4/4 14:36
 */
@Service
public class ForceServiceImpl implements ForceService {

    @Autowired
    private ForceDao forceDao;

    @Override
    public Force getForce(Long id) {
        return forceDao.getForce(id);
    }

    @Override
    public List<Force> getIndexForce() {
        return forceDao.getIndexForce();
    }

    @Override
    public List<Force> getByTypeId(Long typeId) {
        return forceDao.getByTypeId(typeId);
    }

    @Override
    public List<Force> getByProvinceId(Long provinceId) {
        return forceDao.getByProvinceId(provinceId);
    }

    @Override
    public List<Force> getSearchForce(String query) {
        return forceDao.getSearchForce(query);
    }

    @Override
    public List<Force> getAllForce() {
        return forceDao.getAllForces();
    }

    @Override
    public Force getDetailedForce(Long id) {
        return forceDao.getDetailedForce(id);
    }

    @Override
    public int saveForce(Force force) {
        return forceDao.saveForce(force);
    }

    @Override
    public int updateForceView(Long id) {
        return forceDao.updateForceView(id);
    }

    @Override
    public int updateForce(Force force) {
        return forceDao.updateForce(force);
    }

    @Override
    public int deleteForce(Long id) {
        return forceDao.deleteForce(id);
    }

    @Override
    public int updateForcePublished(Long id) {
        return forceDao.updateForcePublished(id);
    }

    @Override
    public List<ProvinceForceCount> getProvinceForceCount() {
        return forceDao.getProvinceForceCount();
    }

}
